#pragma once
#include "base/function.hpp"
#include "base/noncopyable.h"
#include "base/config.h"

namespace net_tools{
class Eventloop;
class Count_down_cond;
namespace base{
class Thread;
} // namespace base
class Eventloopthread : base::noncopyable{
 public:
  Eventloopthread(eventloop_func func,int size = _C::CHANNEL_DEFAULT_SIZE,std::string thread_name = "DEFAULT NAME");
  ~Eventloopthread(){};
  net_tools::Eventloop* Get_eventloop_() const;
 private:
  void Default_func();
  int                   eventloop_size;
  eventloop_func        func_thread_in;
  func                  default_func_;
  base::Thread*         thread_;
  net_tools::Eventloop* eventloop_;
};

} // namespace net_tools